User:Ais523 non-admin/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Ais523 non-admin/monobook.css. |
/* Link to [[User:Lupin/popups.js]] for tracking purposes
<!-- No longer using this // Link to [[user:Where/easy db]] for tracking purposes -->
<pre><nowiki>
*/
/*
function addlilink(tabs, url, name, id, title, key){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id)
{
if(key && title)
{
ta[id] = [key, title];
}
else if(key)
{
ta[id] = [key, ''];
}
else if(title)
{
ta[id] = ['', title];
}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
};
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
return addlilink(tabs, url, name, id, title, key);
};
function showlimenu(id)
{
document.getElementById("ais523_"+id).style.display="block";
}
function addlimenu(tabs, name, id)
{
var na = document.createElement('a');
na.href = 'javascript:showlimenu("'+id+'")';
var mn = document.createElement('ul');
if(id) mn.id = 'ais523_'+id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.className = 'tabmenu';
li.appendChild(na);
li.appendChild(mn);
tabs.appendChild(li);
return li;
}
// test
//addOnloadHook(function() {
//addTab("javascript:alert('This is a test');","test","ca-testing","Testing tab","");
//});
*/
/* Based on [[User:Misza13/Scripts/Status switcher]], but performing quite a different function (that of conditionally including the popup script) */
/*
addOnloadHook(function (){
var user = document.getElementById( 'pt-userpage' ).firstChild.firstChild.data;
var subpage = '/monobook.js/popupson.js';
var linkprefix = "http://en.wikipedia.org/w/index.php?title=User:";
var contribs = document.getElementById( 'pt-mycontris' );
var commontext =
"if(ais523_popupson)"+
" document.write('<s"+"cript type="+'"'+"text/javascript"+'"'+" src="+'"'+"' "+
" + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' "+
" + '&action=raw&ctype=text/javascript&dontcountme=s"+'"'+"></s"+"cript>');"+
"else"+
" document.write('<s"+"cript type="+'"'+"text/javascript"+'"'+" src="+'"'+"' "+
" + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/autoedit.js' "+
" + '&action=raw&ctype=text/javascript&dontcountme=s"+'"'+"></s"+"cript>');";
//Add the links
addlilink(contribs, linkprefix+user+subpage+"&action=edit&ais523autoedit=true", "popups on/off", "pt-popup-toggle", "Switch popups on or off.", "");
if (location.href.indexOf("&action=edit&ais523autoedit=true") == -1) return; //Are we here to auto-edit the status?
//Get new status
//Modify the form
if(document.getElementById('wpTextbox1').value.indexOf("_popupson=1") != -1)
document.getElementById('wpTextbox1').value = "var ais523_popupson=0;"+commontext;
else
document.getElementById('wpTextbox1').value = "var ais523_popupson=1;"+commontext;
document.getElementById('wpSummary').value = "Toggling use of popups";
document.getElementById('wpMinoredit').checked = 'checked';
//Submit it!
document.getElementById('editform').submit();
});
//Autopurge. I wrote this one.
addOnloadHook(function() {
if(location.href=="http://en.wikipedia.org/wiki/User:Ais523" || location.href=="http://en.wikipedia.org/wiki/User:ais523") location.href="http://en.wikipedia.org/w/index.php?title=User:Ais523&action=purge";
});
//This could also be applied to other pages.
//My edit counter, development version
if(!window.navigator||!window.navigator.userAgent||window.navigator.userAgent.indexOf("Mozilla")==-1||window.navigator.userAgent.indexOf("rv:1.4")==-1)
document.write('<sc'+'ript type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?'
+ 'title=User:ais523/editcountdev.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
*/
/* This was only a temporary script; I'll uncomment it if I need to use it again.
//Per [[WP:AN]] revision 67651803, making a script to remove the ezproxy link from pages
addOnloadHook(function() {
if(location.href.indexOf('action=edit')!=-1)
addTab("javascript:removeEZ();","rem ez","ca-rmez","Remove ezproxy references","");
});
function removeEZ()
{
document.editform.wpTextbox1.value=document.editform.wpTextbox1.value.
split('ezproxy.auckland.ac.nz').join('');
document.editform.wpSummary.value='Repaired external link proxy rewrites using'+
'[[WP:US|user scripts]]';
document.editform.wpDiff.click(); //to check
}
*/
/*
// AfD decatting
addOnloadHook(function() {
if(location.href.indexOf('afddecat=Y')!=-1)
{
if(document.editform.wpTextbox1.value.indexOf(
'The following discussion is an archived debate of the proposed deletion of '+
'the article below.')==-1) {window.close(); return;} //still open
document.editform.wpTextbox1.value=document.editform.wpTextbox1.value.
split("{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD|").join("{{ns:0|");
document.editform.wpMinoredit.checked='checked';
document.editform.wpSummary.value="Removing category from closed AfD (using [[WP:US|user scripts]])";
document.editform.wpDiff.click(); //just testing for now
}
});
*/
//test
/*addOnloadHook(function() {
var i;
if(location.href.indexOf('action=edit')!=-1)
{
if(document.editform.wpTextbox1.value.indexOf(
'The following discussion is an archived debate of the proposed deletion of '+
'the article below.')==-1) {i=1; return;}
alert("This AfD is closed.");
}
});*/
/*
//Conditional inclusion of popups (these are a prereq for the easytag script)
document.write('<sc'+'ript type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:ais523/monobook.js/popupson.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
//Title override
addOnloadHook(function() {
if(document.getElementById('titleOverride')!=null)
{
var h1s=document.body.getElementsByTagName("h1");
var i;
for(i in h1s)
if(h1s[i].className=="firstHeading")
h1s[i].replaceChild(document.getElementById('titleOverride').firstChild,
h1s[i].firstChild);
}
});
//Give bodyContent a class
addOnloadHook(function() {document.getElementById('bodyContent').className="bodyContentClass";});
*/
/*
</nowiki></pre>
*/
/*
importScript('User:Ais523/votesymbols.js'); //[[User:Ais523/votesymbols.js]]
importScript('User:Ais523/topcontrib.js'); //[[User:Ais523/topcontrib.js]]
importScript('User:Ais523/contribcalendar.js'); //[[User:Ais523/contribcalendar.js]]
importScript('User:Ais523 non-admin/highlightmyname2.js'); //[[User:Ais523/highlightmyname2.js]]
hmn2username="ais523";
importScript('User:Ais523/catwatchdev.js'); //[[User:Ais523/catwatchdev.js]]
importScript('User:Ais523/sandbox.js'); //[[User:Ais523/sandbox.js]]
importScript('User:Ais523/watchlistnotifier.js'); //[[User:Ais523/watchlistnotifier.js]]
*/
importScript('User:Ais523/adminrights.js'); //[[User:Ais523/adminrights.js]]
importScript('User:Ais523/bracketmatch.js'); //[[User:Ais523/bracketmatch.js]]